home *** CD-ROM | disk | FTP | other *** search
/ Fritz: All Fritz / All Fritz.zip / All Fritz / FILES / GRAPTIES / ANOTHER1.LZH / TMWPART1.EXE / lha / EDIT.DOC < prev    next >
Text File  |  1992-08-28  |  23KB  |  433 lines

  1.  
  2.          ***************** EDITING THE PICTURE FILE ******************
  3.  
  4.          One  of  the fringe benefits of ASCII-VECTOR-GRAPHICS is that
  5.          you  can  edit  the  picture  file  directly  with  any  word
  6.          processor  that  has  a  standard ASCII mode (and most do) or
  7.          text  editor.   You  can  use  a TSR program, run from within
  8.          Microsoft Windows, or use DOS WINDOW  on  the  file  menu  to
  9.          access a word processing program.  With these techniques  you
  10.          can  jump  quickly  from the picture, to the script file, and
  11.          back again.
  12.  
  13.          As you know by now, when you create a picture, it  is  stored
  14.          as  little  bits  of  text  in a plain text file.  When MSHOW
  15.          reads  this  text  picture  file,  the  lines  of  text   are
  16.          translated into parts of the picture.
  17.  
  18.          Generally,  the code goes like this: An object is represented
  19.          by a capital letter. For instance, an R is for Rectangle, a C
  20.          is for Circle and so on. Each object letter is  the  leftmost
  21.          character on a line, and is followed by a series of integers.
  22.          (Integers are numbers with no decimal point, for those of you
  23.          who  are  not  strong  in math.) These integers represent the
  24.          location of the object and it's size.
  25.  
  26.          The first number is the horizontal location of the object  on
  27.          the screen in pixels. Pixels are the  little  dots  of  light
  28.          that  make up everything in a computer picture. If the number
  29.          is zero, the object is crammed up against the  left  edge  of
  30.          the  monitor. In most video modes, 639 is the far right edge,
  31.          because there are 640 pixels across the screen, and the first
  32.          one is 0. In Hercules the right edge is  719  and  in  CGA-LO
  33.          4-color it is 319.
  34.  
  35.          The  second  number is the vertical location with 0 being the
  36.          very top.  In most modes 199 is the bottom of the screen, but
  37.          in Hercules it is 347, in EGA-HIGH it is 349, and in  VGA  it
  38.          is 479.
  39.  
  40.          Many objects will also have  other  numbers  following  them.
  41.          After  this  paragraph  are  the  specific  codes used in The
  42.          Multimedia Workshop picture files.  These are all  the  codes
  43.          of which all pictures are composed.  There are no others.
  44.  
  45.          T - Followed immediately by either a  digit.   This  is  line
  46.          thickness.  If  you  see  a T3, all lines, circles, freehand,
  47.          rectangles or ellipses are drawn  in  the  thick  solid  line
  48.          style from this point until another T is encountered.
  49.              T1 - thin solid line
  50.              T3 - thick solid line
  51.              T4 - thin dotted line
  52.              T5 - thick dotted line
  53.              T6 - thin dashed line
  54.              T7 - thick dashed line
  55.  
  56.          S  -  Followed  by  a  space  and an integer representing the
  57.          frequency in Hertz (cycles per second), then  another  space,
  58.          and  another  integer,  representing  the  length  of time in
  59.          milliseconds for which this sound will play. If the frequency
  60.          following S is 0, the sound is silent, as in a musical rest.
  61.  
  62.          U  -  With  nothing  following.   This  is Wait For User, and
  63.          freezes the system until the user presses any key. (Remember,
  64.          Wait  For User, Delay and Sound effects will not play true to
  65.          form from within The Multimedia Workshop  if  FAST  VIEW  has
  66.          been selected or during screen rewrites by GRID, UNDO,  PIXEL
  67.          EDIT,  and  some  other  services, but they will be effective
  68.          when run from MSHOW.EXE.
  69.              Normally,  you  wouldn't  want  to  put  a   'U'   in   a
  70.          presentation  which  will  use the MSHOW AUTO mode, since the
  71.          presentation will stop at the U until a user presses a key.
  72.  
  73.          P  -  Followed  by two integers is for Pixel, and changes the
  74.          pixel at the designated location (by the first two  integers)
  75.          to the current color.
  76.  
  77.          L  -  Followed  by four integers. This is LINE and displays a
  78.          line starting at the location  specified  by  the  first  two
  79.          numbers  and ending at the location specified by the last two
  80.          numbers. Like all objects this line will be  in  the  current
  81.          thickness and color.
  82.  
  83.          l - On a line by itself.  This marks the end of a loop.   The
  84.          loop will repeat all the lines above it back to the last line
  85.          starting  with b, or until the beginning of the file, or back
  86.          16384 bytes. Loops continue until the user presses any key.
  87.  
  88.              Of  course,  you wouldn't normally want to put a 'l' in a
  89.          presentation which will be using the MSHOW AUTO mode.
  90.  
  91.          b - On a line by itself.  This marks  a  TAKE  BREATH.   This
  92.          forces MSHOW or TMW to read the disk at this point and refill
  93.          the  RAM  memory at this location.  That way, there are 16384
  94.          bytes (if the file is large enough) of  uninterrupted  script
  95.          file  in  RAM, so that the program won't have to stop to read
  96.          the disk, possibly in the middle of a time-critical animation
  97.          or sound effect.
  98.  
  99.          Z  - Followed by six integers.  This specifies a ZOOM action.
  100.          The first four integers represent the  original  area  to  be
  101.          changed.   The last two are the new lower right corner of the
  102.          area in it's new dimensions.  The upper left  corner  remains
  103.          in the same location.
  104.  
  105.          KA  -  Followed  by  six integers. The first four specify the
  106.          area of the original block to be animated. The  next  is  the
  107.          amount of time in milliseconds between moves, and the last is
  108.          the  copystyle  (3  for transparent, 2 for opaque). Following
  109.          the line with KA are one or more lines containing nothing but
  110.          two integers.  These are the upper  left  corner  coordinates
  111.          for  each block move comprising the animation.  There must be
  112.          a blank line at the end of this series.
  113.  
  114.          KC  - Followed by seven integers.  Borrowed from Wordstar and
  115.          Borland conventions,  this  is  for  COPY.   The  first  four
  116.          integers specify the area to be copied, and the last two mark
  117.          the  location of the upper left corner of the new object. The
  118.          last integer determines whether the block will be  copied  in
  119.          TRANSPARENT  style  or OPAQUE.  If 3, it will be transparent,
  120.          otherwise it is opaque.
  121.  
  122.          KV  -  Followed  by  seven integers.  Again from Wordstar and
  123.          BORLAND, this is for MOVE. Again six integers are used in the
  124.          same manner as KC.  The last integer determines  whether  the
  125.          block  will  be copied in TRANSPARENT style or OPAQUE.  If 3,
  126.          it will be transparent, otherwise it is opaque.
  127.  
  128.          KY - Followed by four integers.  An  ERASE  in  "Wordstarese"
  129.          These four numbers mark the rectangular region to be deleted.
  130.  
  131.          R  -  Followed  by  four integers.  This creates a rectangle.
  132.          The first two numbers mark the  upper  left  corner  and  the
  133.          last two mark the lower right corner.
  134.  
  135.          O - Followed immediately by a digit (no space between  them).
  136.          This  changes  the current color. Any object drawn will be in
  137.          this color until the color is changed  again.  In  monochrome
  138.          graphics  modes,  0 is black or the background color, and any
  139.          other number between 1 and 15 results in foreground or white.
  140.          In the 16-color modes:
  141.  
  142.                0 = BLACK
  143.                1 = MIDNIGHT BLUE
  144.                2 = TREE GREEN
  145.                3 = DARK CYAN
  146.                4 = CRIMSON
  147.                5 = PURPLE
  148.                6 = BROWN
  149.                7 = LIGHT GRAY
  150.                8 = DARK GRAY
  151.                9 = AVERAGE BLUE
  152.                10 = BRIGHT GREEN
  153.                11 = SKY BLUE
  154.                12 = BRIGHT RED
  155.                13 = MAGENTA
  156.                14 = YELLOW
  157.                15 = WHITE
  158.            (assuming there have been no 'n's in the file)
  159.  
  160.          In  256-color mode, the above list shows the first 16 colors,
  161.          beyond this, you are on your own with colors!
  162.  
  163.          n  - Followed immediately by 2 or 4 integers.  This indicates
  164.          a color palette change and only works in UNIVERSAL, EGA-HI or
  165.          the VGA video modes.  The first number is the color number to
  166.          change.  For instance, if the first number  is  3,  then  the
  167.          color  affected  will  be the third one on the color menu. In
  168.          16-color modes, the next  number  indicates  then  new  value
  169.          (range  0-63)  for  the  color.   In  the 256-color modes the
  170.          second number (0-63) indicates the amount of  red,  the  next
  171.          number  is  for  green  and  the  last is for blue. These are
  172.          negative colors, oddly enough: Green + red = yellow.   Notice
  173.          that the n is not capitalized.
  174.  
  175.          B - Followed immediately by a digit (no space between  them).
  176.          This  has  no  effect unless the graphics mode is CGA-HIGH or
  177.          CGA-LOW,  in which case it immediately changes the background
  178.          color.  You can choose any of the first 8 (0-7)  colors  from
  179.          the above listing for background color.
  180.  
  181.          H  -  Followed  by  a space then a filename.  This displays a
  182.          .PCX file.
  183.  
  184.          b - On a line by itself.  This is "Breathe In", which  resets
  185.          the  RAM  area holding the file to begin at this place in the
  186.          script.  This is useful before  a  series  of  sounds  or  an
  187.          animation,  where  you  don't  want  the presentation to stop
  188.          while the next portion of the script file is  read  from  the
  189.          disk.  After 'b', as many as  16,384  bytes  will  be  played
  190.          continuously  before  another  disk read. 'b' is also used to
  191.          mark the beginning of a loop.
  192.  
  193.          l  -  on  a  line  by  itself.  This marks the end of a loop.
  194.          Whatever lines in the script file from here UP  to  the  last
  195.          line  containing  only  a  'b' (or the beginning of the file)
  196.          will be played over and over again until the user presses any
  197.          key.  Use this with caution.  Block moves  must  always  have
  198.          the  same  picture  data,  or  the picture will not loop, but
  199.          change continuously instead.  Experiment to see what I mean.
  200.  
  201.          h - Followed by a space then an executable  file  name  or  a
  202.          batch file name.  This causes the named program or batch file
  203.          to execute within your script.
  204.  
  205.          C - Followed by four integers.   A  circle.   The  first  two
  206.          integers  mark  the centerpoint location, and the last is the
  207.          radius of the circle.  As with most objects, the circle  will
  208.          be drawn in the current color and line thickness.  The fourth
  209.          number,  if  2, indicates that the center of the circle is to
  210.          be shown with a + mark.
  211.  
  212.          E - Followed by seven integers.  An ellipse.  The  first  two
  213.          integers  mark the centerpoint, the next two are the starting
  214.          and ending angles of the ellipse. A full ellipse starts at  0
  215.          degrees and ends at 360. 0 degrees is the 3 o'clock position,
  216.          High  Noon  is 90 degrees, 9 o'clock is 180, and 6 o'clock is
  217.          270. Therefore a partial ellipse, drawn from 45 to 90 degrees
  218.          would range from approximately 1:30 to noon of a clock  dial.
  219.          The last two digits in an ELLIPSE are the horizontal followed
  220.          by  the  vertical  axes  in pixels. The seventh number, if 2,
  221.          indicates that the center of the ellipse is to be shown  with
  222.          a + mark.
  223.  
  224.          F  -  Followed  by three integers. This fills a bordered area
  225.          with the currently selected color in the pattern specified by
  226.          the third number.  The color must be the same as the  border.
  227.          If  there  is  even  a one-pixel gap in the border, the color
  228.          will leak out and fill the whole picture.
  229.  
  230.          text/ - Followed immediately by five integers. The first two
  231.          integers  mark  the  position of the upper left corner of the
  232.          text block.  The third number selects the typeface  or  font.
  233.          The  last  two  integers  represent  the magnification of the
  234.          typeface. Of these last two, the first is for the  width  and
  235.          the  second is for height of the font.  The 'default' size of
  236.          most fonts is 4 wide and 4 high.  A  number  smaller  than  4
  237.          renders a narrower font and a larger number is wider. And, of
  238.          course,  if  the  last  number  is  larger,  the font will be
  239.          taller, but if it is a number smaller than 4, the  font  will
  240.          be small.
  241.  
  242.              The  possible sizes range from 1 to 9.  If you try to use
  243.          a width or height  outside  of  this  range,  any  number  of
  244.          horrible things may happen to your presentation!
  245.  
  246.              The  first two typefaces, BITMAP and TRIP, are built into
  247.          the program, but the others are kept on the disk in  external
  248.          files.   These  files  end with .CHR.  So, if you want to use
  249.          the SCRIPT font, for instance, you must supply  the  SCRI.CHR
  250.          file  along  with  your  picture files on every disk copy you
  251.          make.
  252.  
  253.              The first typeface, BITMAP, is handled differently by the
  254.          program.  Vertical  and  horizontal  dimensioning  is handled
  255.          together, you control overall size of this font, but not  the
  256.          width or height independently.
  257.  
  258.              Text is drawn in the currently selected color.  The  text
  259.          begins  on  the  line following "text/" and the five  numbers
  260.          and continues until a line is encountered which  starts  with
  261.          ~.   This  ~  must  be  in the first column of the first line
  262.          following a block of text, otherwise MSHOW  will  assume  the
  263.          following  lines  are  to  be displayed as text and will most
  264.          likely crash. So, as soon as MSHOW  encounters  a  line  that
  265.          starts  with  "text/" the lines following are considered text
  266.          and displayed verbatim until a line starting with ~ is found.
  267.          TEXT BLOCKS MUST BE FOLLOWED BY A LINE THAT  STARTS  WITH  ~.
  268.          You  can  edit  the  text  just  as  you would any ASCII text
  269.          document. Keep in mind that the  size  of  the  block  cannot
  270.          exceed the room available in the picture.
  271.  
  272.          title/ - Followed by five integers.  The first  two  integers
  273.          mark  the  center  around  which the title will be displayed.
  274.          The  third  number  selects the typeface. And, as with text/,
  275.          the last two numbers control the size of the font.  The  line
  276.          following  "title/"  and the five numbers  is the title which
  277.          will be displayed verbatim.
  278.  
  279.          D - Followed immediately by one integer.  DELAY,  causes  the
  280.          program  to  freeze  for  the  amount of time in milliseconds
  281.          indicated by the  integer.   The  largest  value  allowed  is
  282.          approximately  65000  milliseconds.   If  a  longer  delay is
  283.          required, several delays can be used together. For example, a
  284.          two-and-a-half minute delay would look like this:
  285.  
  286.          D60000
  287.          D60000
  288.          D30000
  289.  
  290.          And  that's  all  the  codes  required  to  make   multimedia
  291.          presentations!
  292.  
  293.          These  are  fully at your disposal for editing with your text
  294.          editor or word processor. For instance, if you  have  made  a
  295.          picture  with  a  rectangle in it:
  296.  
  297.          R113 24 196 68
  298.  
  299.          but you wish the rectangle were a little more  to  the  left,
  300.          you could simply change it:
  301.  
  302.          R103 24 186 68
  303.  
  304.          Then rerun The Multimedia Workshop or MSHOW  and  check  your
  305.          change. In this illustration, your rectangle would have moved
  306.          10 pixels to the left.
  307.  
  308.          Lets  say  your  rectangle  was  yellow, and you wish it were
  309.          white. You could precede the line like this:
  310.  
  311.          015
  312.          R103 24 186 68
  313.  
  314.          No doubt you can see the incredible power in ASCII editing of
  315.          pictures!  You  can  fine  tune your graphics, sound effects,
  316.          animation timings, even correct typographical errors in  text
  317.          within pictures!
  318.  
  319.          There are some conventions that must be observed.  Make  sure
  320.          to use a single space between integers.  Make sure to use the
  321.          exact   same   spellings  and  capitalizations.  Make sure to
  322.          preserve blank lines where they exist in  the  picture  file.
  323.          For  instance,  after  a  series  of sounds, there must be at
  324.          least one blank line. Make sure to test your  pictures  after
  325.          you  have  made  changes.   And  most  of  all,  feel free to
  326.          experiment considerably.  With  practice,  you'll  understand
  327.          this  well  and  be  able  to  generate  very fine work, very
  328.          quickly!
  329.  
  330.          Since  all  the  picture  command  lines  start  in  the very
  331.          left-most column, you can temporarily remove an element  from
  332.          a  picture  by  simply typing a space or an * in front of the
  333.          line.  This causes it to move to the second column.   If  The
  334.          Multimedia Workshop or MSHOW.EXE finds a ' ' or an '*' in the
  335.          first  column  of  a  line, they ignore the whole rest of the
  336.          line, except within text blocks.
  337.  
  338.             This is good for troubleshooting a picture.  For instance,
  339.          let's say you have created a complicated picture, and in your
  340.          picture is an annoying line which runs diagonally through the
  341.          wrong place as annoyingly as a pipe wrench in  a  typewriter.
  342.          Try  to find the line. When you think you have it, put a * in
  343.          front of it, and check the picture. One line in your  picture
  344.          will  not be displayed.  If you put the * in the right place,
  345.          the diagonal line will be gone,  otherwise  some  other  line
  346.          will  be  missing.  Once  you  have  found  the right line to
  347.          delete, you can simply leave the * there or you can  actually
  348.          delete the line.
  349.  
  350.          If  you  use  a  text  editor  which runs TSR (Terminate Stay
  351.          Resident) such as Borland's Sidekick, you can do your editing
  352.          while The Multimedia Workshop remains  loaded  and  see  your
  353.          changes  almost  instantly.  The best way to do this seems to
  354.          be to select SEE from the control panel first, then  do  your
  355.          editing,  then  return to SEE, press [Enter] and then [Enter]
  356.          again to redraw the picture.  This is best because some TSR's
  357.          do funny things to the picture, especially if in VGA mode, or
  358.          they steal the mouse cursor and won't give it back! Note:  If
  359.          your  RAM space is limited, you'll sometimes have just enough
  360.          space for a small TSR and The Multimedia Workshop.  Kick  the
  361.          others out of your AUTOEXEC.BAT file. If still a problem, you
  362.          can  almost always switch between MSHOW.EXE and a TSR without
  363.          RAM problems.
  364.  
  365.  
  366.                                   VIDEO MODES
  367.  
  368.          You'll  notice that the first line in picture files is always
  369.          "mode"  followed  by  a  digit.  This is how MSHOW.EXE or The
  370.          Multimedia Workshop know which mode to use. The modes are:
  371.  
  372.             1 CGA-HIGH 2-color
  373.             2 CGA-LO 4-color
  374.             3 640 x 200 EGA-LO 16-color (UNIVERSAL MODE)
  375.             4 EGA-HIGH
  376.             5 HERCULES MONOCHROME
  377.             6 VGA-HIGH
  378.  
  379.          GUESS  WHAT?  You can fudge these modes.  For instance, Let's
  380.          pretend  you have a HERCULES graphics system, but you want to
  381.          create a presentation in UNIVERSAL mode so  that  the  widest
  382.          possible   audience  can  see  your  stuff.   The  Multimedia
  383.          Workshop  knows  that  all  you  have  is  HERCULES,  and  so
  384.          automatically  puts  a "mode5" at the start of every picture,
  385.          so it will run  at  the  best  possible  resolution  in  your
  386.          system,  and  not  confuse  you with 16-color menus you can't
  387.          use.
  388.  
  389.          But if you use a mode5 (Hercules) presentation in most  other
  390.          systems,  MSHOW.EXE  will  first display a warning that it is
  391.          the  wrong  graphics  mode,  then  translate  the   pictures.
  392.          Furthermore, Hercules allows 720 pixel-wide pictures, but the
  393.          other  graphics  modes  don't, so the right-hand side of your
  394.          presentations will be cut off for CGA and VGA users.
  395.  
  396.          So  here's  what you do: You start by changing the first line
  397.          in each picture from "mode5" to "mode3." Mode 3 is  UNIVERSAL
  398.          MODE.  It  will  still play on your HERCULES system, but will
  399.          now also work without  the  warning  on  all  other  standard
  400.          graphic  systems.  Then  you make your pictures to fit within
  401.          640 horizontal pixels and 200 vertical pixels. In other words
  402.          draw your pictures in the upper left portion of  your  screen
  403.          not exceeding coordinates 639 by 199.
  404.  
  405.          This  is  important.  When  you  play a picture in a mode for
  406.          which it was not designed, if the picture is larger than  the
  407.          graphics  mode  attempting  to  display  it,  the program may
  408.          crash. So, UNIVERSAL MODE pictures cannot exceed 639 x 199.
  409.  
  410.          NOTE:  Do  not fudge graphics modes if you have included .PCX
  411.          files, because they are usually not  transportable  from  one
  412.          type  of  graphics  card  to  another  (or  one  emulation to
  413.          another). In other words, you cannot end up with  a  Hercules
  414.          .PCX file working on a .CGA system.
  415.  
  416.          And last, to add colors, for those who can display them,  you
  417.          can use the picture file COLORS  to  see  a  chart  and  then
  418.          sprinkle  your  picture  files with "O"'s followed by numbers
  419.          for color changes. Getting the colors  right  is  tricky,  so
  420.          you  might  want  to  at  least  view  your presentation on a
  421.          borrowed computer which has color, to make sure it looks ok.
  422.  
  423.          A  little  inside  tip  for  professional-looking colorizing:
  424.          Stick to two or three  colors,  perhaps  text  in  sky  blue,
  425.          graphics in white, and arrows in red.
  426.  
  427.          _____________________________________________________________
  428.                                                         end of chapter
  429.  
  430.  
  431.  
  432.  
  433.